<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="commons/header :: common-header(~{::title}, ~{::link})">
    <link rel="stylesheet" th:href="@{/css/index.css}">
    <title>Subject Show</title>
</head>

<body>
<!-- Header -->
<div th:replace="commons/header :: header"></div>

<div class="container">
    <div class="row row-offcanvas row-offcanvas-right content_container">
        <div class="col-xs-12 col-sm-9 col-md-9 col-lg-9 col-md-offset-1 col-sm-offset-1">
            <!-- 信息展示位置 -->
            <div class="show_div">
                <img alt="来SubjectShow选专业吧" class="show_img" th:src="@{cover/cover.png}">
            </div>
            <div class="index_search">
                <div th:replace="commons/search :: search-component"></div>
            </div>
            <span class="hot-search-span">热门搜索：</span>
            <form class="form-group form-hot-search" th:action="@{/majors}" th:each="search:${searches}" th:method="post" th:object="${searchVo}">
                <input hidden="hidden" name="name" th:value="${search.name}" type="text">
                <button class="btn btn-search"  th:classappend="${search.searchCount % 3 eq 0 ? 'btn-success' : (search.searchCount % 2 eq 0 ? 'btn-warning' : 'btn-info')}" th:text="${search.name}" type="submit"></button>
            </form>
            <!-- 专业种类展示 -->
            <h2 class="center-block" th:text="专业种类"></h2>
            <div class="row">
                <!--/*@thymesVar id="subjects" type="com.hrong.major.model.SubjectCategory"*/-->
                <div class="col-xs-6 col-sm-6 col-md-4 col-lg-4 subject-container" th:each="subject:${subjects}">
                    <a th:href="@{'/majors/'+${subject.id}(page=1, size=8)}">
                        <h2>[[${subject.name}]]</h2>
                        <p><span class="btn btn-default" role="button">查看专业&raquo</span></p>
                    </a>
                </div>
            </div>
        </div>
    </div>
</div>
<footer>
    <div th:replace="commons/footer :: footer(~{::script})">
        <script th:src="@{/js/index.js}"></script>
    </div>
</footer>
</body>
</html>
